<?PHP
/**
 * This file is part of Thai-Cms < code.google.com/p/thai-cms >
 *
 *  This is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This software is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser Public License
 *  along with this software.  If not, see <http://www.gnu.org/licenses/>.
 */

 /**
 * @ผู้เขียน drsaluml
 */
 
//หากมีการเรียกไฟล์นี้โดยตรง
if (eregi("config.php",$PHP_SELF)) {
    header("Location: ../index.php");
    die();
}
// Version
define("_SCRIPT","ThaiCMS"); 
define("_VERSION","1.0"); 
define("WEB_VERSION",""._SCRIPT." "._VERSION."");

//Web Site
define("WEB_SITE","123456");

//MYSQL Connect
define("DB_HOST","127.0.0.1");
define("DB_NAME_ADM","thai_cms");
define("DB_USERNAME_MY","root");
define("DB_PASSWORD_MY","123456");

//ตรวจสอบ IP
if ($_SERVER['HTTP_CLIENT_IP']) { 
$IPADDRESS = $_SERVER['HTTP_CLIENT_IP'];
} elseif (ereg("[0-9]",$_SERVER["HTTP_X_FORWARDED_FOR"] )) { 
$IPADDRESS = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else { 
$IPADDRESS = $_SERVER["REMOTE_ADDR"];
}
define("IPADDRESS",$IPADDRESS) ;

?>
